-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add String support for GDScript Enums #21014
Conversation
0ea4628
to
ddc6ab3
Compare
Just tested this on my machine with both "=" and ":". Seems like it's all working, and I just fixed all of the syntax check errors (some weren't even made by me, so I'm not sure how they managed to get into my build). Edit: realized I only tested declarations, but haven't tested actually exporting the values yet. I suspect that will require a bit more work. Edit 2: Double checked exporting / changing the exported value. Everything there seems to work too. |
@vnen Could you have a look at this PR? Will need a rebase eventually. |
We discussed this on IRC with @vnen and @bojidar-bg, and agreed that this proposal and the related issue are likely not the right approach to solve a valid issue (getting a string from an (int) enum value). Logs:
@bojidar-bg Can I let you open the follow-up issue? |
Just curious if there has been any follow up issue created for this? @akien-mga @bojidar-bg ? Thanks |
Nevermind. Found it and linking here for easier reference: #31896 |
Fixes #20988.
This PR also makes it possible to create enum value assignment using a colon (Dictionary syntax) in addition to the equals sign (original enum syntax). Since these effectively create Dictionaries anyway, it makes sense to allow either syntax for this purpose rather than arbitrarily erroring on the Dictionary syntax.